/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package bmacotada.orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class Paciente_1DetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression pa_id_paciente;
	public final IntegerExpression rut;
	public final StringExpression nombre;
	public final IntegerExpression edad;
	public final IntegerExpression telefono;
	public final StringExpression direccion;
	
	public Paciente_1DetachedCriteria() {
		super(bmacotada.orm.Paciente_1.class, bmacotada.orm.Paciente_1Criteria.class);
		pa_id_paciente = new IntegerExpression("pa_id_paciente", this.getDetachedCriteria());
		rut = new IntegerExpression("rut", this.getDetachedCriteria());
		nombre = new StringExpression("nombre", this.getDetachedCriteria());
		edad = new IntegerExpression("edad", this.getDetachedCriteria());
		telefono = new IntegerExpression("telefono", this.getDetachedCriteria());
		direccion = new StringExpression("direccion", this.getDetachedCriteria());
	}
	
	public Paciente_1DetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, bmacotada.orm.Paciente_1Criteria.class);
		pa_id_paciente = new IntegerExpression("pa_id_paciente", this.getDetachedCriteria());
		rut = new IntegerExpression("rut", this.getDetachedCriteria());
		nombre = new StringExpression("nombre", this.getDetachedCriteria());
		edad = new IntegerExpression("edad", this.getDetachedCriteria());
		telefono = new IntegerExpression("telefono", this.getDetachedCriteria());
		direccion = new StringExpression("direccion", this.getDetachedCriteria());
	}
	
	public Cuestionario_1DetachedCriteria createCuestionario_1Criteria() {
		return new Cuestionario_1DetachedCriteria(createCriteria("ORM_Cuestionario_1"));
	}
	
	public Paciente_1 uniquePaciente_1(PersistentSession session) {
		return (Paciente_1) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Paciente_1[] listPaciente_1(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Paciente_1[]) list.toArray(new Paciente_1[list.size()]);
	}
}

